var pageii = null;
var grid = null;
$(function() {
	
	grid = lyGrid({
		pagId : 'paging',
		l_column : [ {
			colkey : "case_no",
			width : '125',
			name : "病历编号",
		},{
			colkey : "patient_number",
			width : '125',
			name : "患者编号",
		},  {
			colkey : "patient_name",
			width : '80',
			name : "姓名",
		}, {
			colkey : "patient_sex",
			width : '50',
			name : "性别",
		}, {
			colkey : "patient_age",
			width : '50',
			name : "年龄"
		}, {
			colkey : "series_name",
			width : '100',
			name : "临床诊断"
		}, {
			colkey : "symptom",
			width : '120',
			name : "临床表现"
		}, {
			colkey : "conclusion",
			width : '120',
			name : "辩证"
		}, {
			colkey : "cure",
			width : '100',
			name : "治则"
		},{
			colkey : "treatment",
			width : '350',
			align : 'left',
			name : "治疗方案",
			renderData : function(rowindex, data, rowdata, column) {
				if (data == null || data == undefined || data == '') { 
					return "";
				} else {
					return "<pre sytle='font-size:10px;'>"+data+"</pre>";
				}
			}
		},{
			colkey : "prescription_date",
			width : '150',
			name : "生成时间"
		}],
		jsonUrl : rootPath + '/case/findByPage.shtml',
		serNumber : true
	});
	$("#search").click("click", function() {// 绑定查询按扭
		var searchParams = $("#searchForm").serializeJson();// 初始化传参数
		grid.setOptions({
			data : searchParams
		});
	});
});